import React from 'react';
import ReactDOM from 'react-dom';
import { Breadcrumb, Button } from 'antd';



const Index = React.createClass({

  handleClick() {
    history.go(-1);
  },
  render () {
    let path = this.props.location.pathname;
    let lastPath = path.split('/')[path.split('/').length - 1];
    let routerItem = {
      'checkOutList': '退房列表',
      'add': '退租',
    };
    return (
      <div>
        <div className="nav-bar">
          <Breadcrumb separator="-" >
            <Breadcrumb.Item>出租管理</Breadcrumb.Item>
            <Breadcrumb.Item>{routerItem[lastPath]}</Breadcrumb.Item>
          </Breadcrumb>
          <Button type="primary" className="returnList" onClick={this.handleClick}>返回</Button>
        </div>
        <div className="content-wrapper ">
          {this.props.children}
        </div>
      </div>
    );
  }
});

export default Index